package com.lagou.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

/**
 * 将dispatcherServlet注入到ioc中
 */
@ComponentScan("com.lagou")
@Configuration
public class AppConfig {
    @Bean
    public DispatcherServlet getDispatcherServlet(){
        return new DispatcherServlet();
    }
}
